package com.cyy.dyeing.service.impl;

import com.cyy.dyeing.common.DataStatusEnum;
import com.cyy.dyeing.mapper.BaseMapper;
import com.cyy.dyeing.model.Info;
import com.cyy.dyeing.service.BaseService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * @Author: cyy
 * @Date: 2024/7/26
 */
@Service
@Transactional
public class BaseServiceImpl implements BaseService {

    @Autowired
    private BaseMapper baseMapper;

    @Override
    public List<Info> getInfoList(Integer info_type) {
        return baseMapper.findInfoList(info_type, DataStatusEnum.ACTIVE.getCode());
    }

    @Override
    public List<Info> getInfoList() {
        return baseMapper.findAllInfo(DataStatusEnum.ACTIVE.getCode());
    }
}
